{{include file='header.htm' title=$photodata.title}}
<style type="text/css">
@import url(css/photos.css);
</style>

<script type="text/javascript">
    <!--
    
    $(function () {
        $('textarea.limited').maxlength({
            'feedback' : '.charsLeft', 
			'useInput' : true
        });
    });
    
    //-->
</script>
<DIV id=content>

	<H1 class=photo_title >
		{{$photodata.title}}
	<DIV id=title_editor></DIV>
	</H1>
	
	<div class="h_status">
		<div class="r_option">

			<a href="index.php?m=photo&a=photo_view&photoid={{$photodata.photo_id}}&goto=up">上一张</a><span class="pipe">|</span>
			<a href="index.php?m=photo&a=photo_view&photoid={{$photodata.photo_id}}&goto=down" id="nextlink">下一张</a><span class="pipe">|</span>
			<a href="index.php?m=album&a=albumlist&userid={{$photodata.user_id}}">返回相册</a>
	{{if $smarty.session.user_id == $photodata.user_id}}
	<span class="pipe">|</span><a href="index.php?m=photo&a=edit&photoid={{$photodata.photo_id}}">编辑</a>
	<a href='index.php?m=photo&a=delete&photoid={{$photodata.photo_id}}'>删除</a>
{{/if}}
		</div>
	</div>


	<div class="photobox">
		<a href="index.php?m=photo&a=photo_view&photoid={{$photodata.photo_id}}&goto=down"><img src="./upload/{{$photodata.url}}" /></a>
		<p>{{$photodata.pdescription}}</p>
		<p>上传于 {{$photodata.created|date_format:"%Y-%m-%e"}} (大小:{{$photodata.filesize%1024}} KB)</p>
	</div>

	<div style="padding-top:20px; width:100%; overflow:hidden;">
		<div class="photocomment">	
			<div class="comments_list" id="comment">

				<ul id="comment_ul">
			{{section name=clist loop=$commentdata }}	
					<li id="comment_1_li">
						<div class="avatar1">
							<a href="index.php?m=profile&a=view&userid={{$commentdata[clist].authorid}}"><img src="avatar.php?uid={{$commentdata[clist].authorid}}" alt="zwtxdy" class="avatar" /></a>
						</div>
						<div class="title">
							<div class="r_option">
									{{if $smarty.session.user_id == $commentdata[clist].uid}}
<a href='index.php?m=comment&a=delete&cid={{$commentdata[clist].comment_id}}&id={{$commentdata[clist].id}}&idtype=1'>删除</a>
{{/if}}
							</div>

							<a href="index.php?m=profile&a=view&userid={{$commentdata[clist].authorid}}" id="author_1">{{$commentdata[clist].author}}</a> 于<span class="time">{{$commentdata[clist].created|date_format:'%Y-%m-%e'}}</span>说
						</div>
						<div class="detail" id="comment_1">{{$commentdata[clist].message}}</div>
					</li>
				{{/section}}
				
				</ul>

			</div>
			<div class="page">{{$commentmulti}}</div>
			<DIV id=commentMaker>
				<H3>我来说两句</H3>
				<form id=commentForm name=commentForm
				action='index.php?m=comment&a=post' 
				method=post>
				<INPUT type=hidden value={{$photodata.photo_id}} name=photoid>
								<input type=hidden value=1 name=idtype>
				<P><textarea id=comment_content class='limited' name=pcomment rows=8></textarea> 
				<br />  还可以输入 <span class="charsLeft">200</span> 个字符       
				<input type="hidden" name="maxlength" value="200" />
				</P>
				<P><INPUT class=Btn tabIndex=2 type=submit value=直接发表></P>
				</FORM>
			</DIV>
		</div>

		<div class="photobar">
			<div class="cat">
				<ul>
					<LI><a href="upload/{{$photodata.url}}" target=_blank>查看原图</a></LI>
				  <LI>上传于{{$photodata.created|date_format:"%Y-%m-%e"}}</LI>
				  <LI>被查看了<B>{{$photodata.pviewnum}}</B>次</LI>
				  <LI><B>{{$photodata.pcomment_num}}</B>条评论</li>
				
						
				</ul>
		</div>
	</div>
</div>










</DIV>
{{include file='footer.htm'}}
